<!-- <div class="page-title pad group"> -->
<!-- 	<i class="fa fa-home"></i>Trang chủ -->
<!-- 	<i class="fa fa-angle-double-right"></i> <span>Tin tức</span> -->
<!-- 	<i class="fa fa-angle-double-right"></i> <span>Tin pháp luật</span> -->
<!-- </div> -->
<?php
if (isset($breadcrumb) && !empty($breadcrumb)) :
	echo $this->element('breadcrumb');
endif;
?>
<div class="pad group">
	<div class="post-list group">
		<div class="lbl-category pad">
			<p><?php echo $cat_name?></p>
		</div>
		<div class="group-content">

		<?php
		if(isset($list_news) && !empty($list_news)):
			$total = count($list_news);
			foreach ($list_news as $key => $news):
				$key++;
				$linkCategory = $this->Html->url(
						array(
								'controller' => 'categorys',
								'action' => 'index',
								'cat_id' => $news['News']['category_id'],
								'cat_rewrite' => $news['Category']['cat_rewrite'],
								'cat_parent_rewrite' => $news['Category']['cat_parent_rewrite'],
						)
				);

				$linkDetail = $this->Html->url(
						array(
								'controller' => 'news',
								'action' => 'detail',
								'news_id' => $news['News']['id'],
								'news_rewrite' => $news['News']['new_rewrite'],
								'cat_rewrite' => $news['Category']['cat_rewrite'],
								'ext' => 'html',
						)
				);
		?>
			<article class="item-list">
				<div class="post-thumbnail">
					<a title="<?php echo $news['News']['name'];?>" href="<?php echo $linkDetail;?>">
						<?php echo $this->Html->image('/admin/uploads/' . $news['News']['new_picture'], array('alt' => $news['News']['name'], 'fullBase' => false, 'class' => 'post-image', 'onerror' => 'this.src="/img/none.jpg"'));?>
					</a>
				</div><!--/.post-thumbnail-->
				<div class="post-box-title">
					<a title="<?php echo $news['News']['name'];?>" rel="bookmark" href="<?php echo $linkDetail;?>"><?php echo $news['News']['name'];?></a>
				</div><!--/.post-title-->
				<div class="post-meta">
					<p class="post-date"><?php echo date('d/m/Y', $news['News']['last_update']);?></p>
				</div><!--/.post-meta-->
				<div class="entry2">
					<p><?php echo $news['News']['brief'];?></p>
				</div><!--/.entry-->
				<div class="clear"></div>
			</article>
		<?php
			endforeach;
		endif;
		?>
		</div>
	</div>
</div>
<?php if($this->Paginator->param('count') > $page_number_limit):?>
<div id="dataTables-example_paginate" class="dataTables_paginate paging_simple_numbers">
	<ul class="pagination flRight box25">
		<?php

// 			$this->Paginator->options(array(
// 					'url'=> array(
// 							'controller' => 'categorys',
// 							'action' => 'index'
// 					)));
			echo $this->Paginator->prev(__('Previous'), array(
				'class' => 'previous',
				'tag' => 'li',
				'disabledTag' => 'a'
			));

			echo $this->Paginator->numbers(array(
				'separator' => '    ',
				'tag' => 'li',
				'currentClass' => 'active',
				'currentTag' => 'a'
			));

			echo $this->Paginator->next(__('Next'), array(
				'class' => 'next',
				'tag' => 'li',
				'disabledTag' =>'a'
			));
		?>
	</ul>
</div>
<?php endif;?>

